package mumu.android.app;

import mumu.android.R;
import mumu.android.lib.Async.Future;
import mumu.android.lib.app.SysReceiver;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentFilter;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 *
 * 简单服务处理。 关闭app后，服务终止
 * @author Administrator
 * 
 */
public class simservier extends Activity {


	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitle("简单服务");
		setContentView(R.layout.broadcast1);

		Button btn_3 = (Button) findViewById(R.id.btn_3);// reg
		Button btn_4 = (Button) findViewById(R.id.btn_4);// unreg

		btn_3.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(simservier.this, zLib_simservice.class);
				startService(intent);
			}
		});
		btn_4.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(simservier.this, zLib_simservice.class);
				stopService(intent);
			}
		});
	}

}
